The present invention relates to a microcomputer having an electrically erasable and programmable non-volatile memory and a CPU (Central Processing Unit), and particularly to erase and program control on the non-volatile memory, e.g., a technology effective for application to a one-chip microcomputer having a flash memory.
An electrically erasable and programmable non-volatile memory such as a flash memory or the like stores information therein according to the difference between threshold voltages programmed to memory cells. In the flash memory, the difference between the threshold voltages is realized by the difference between the amounts of electrons or positive holes held by a floating gate. For example, a state of a threshold voltage high relatively with respect to a threshold voltage in a thermal equilibrium state is referred to as a program state, and a state of a threshold voltage low relatively therewith is called an erase state (the definition of the inverse is allowed). At this time, respective operations for erasing for bringing each memory cell into the erase state and programming for bringing each memory cell into the program state need to repeatedly perform the application of a high voltage pulse and verify of a threshold voltage state based on it.
A microcomputer with a flash memory being on-chipped includes a writer mode and a boot mode as operations modes for enabling the on-chip flash memory to execute erase and programming. The writer mode is an operation mode for making the microcomputer equivalent to a flash memory chip apparently and connecting it to a programming or writing device like an EPROM writer to thereby make it possible to carry out erasing and programming. The boot mode is an operation mode for establishing communications with a packaging system via a serial interface such as step synchronism or the like in a state of the microcomputer being packaged in a system to thereby make it possible to carry out erasing and programming. When a program and data are initially written into the on-chip flash memory before the system packaging, the writer mode is available. However, the reprogramming of information stored in an on-chip flash memory for upgrading a program and tuning data after the system packaging needs to utilize the boot mode. It is also possible to perform erasing and programming on board according to the execution of a user control program stored in a user area of a flash memory.
Incidentally, Unexamined Patent Publication No. Hei 5(1993)-266219 is known as an example of a reference in which the microcomputer equipped with the flash memory has been described.